package com.abaaba.project2.controller.wxcontroller;

import com.abaaba.project2.bean.bo.WxSearchGoodsBO;
import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.bean.vo.wx.WXSearchGoodsVO;
import com.abaaba.project2.service.wx.WxSearchGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Hedgehog
 * @Date 2021/6/7 21:27
 * @Version 1.0
 */
@RestController
@RequestMapping("/wx/goods")
public class WxSearchGoodsController {
    @Autowired
    WxSearchGoodsService wxSearchGoodsService;

    //@RequestMapping("/list")
    public BaseRespVo wxSearchGoodsList(WxSearchGoodsBO wxSearchGoodsBO){

        WXSearchGoodsVO wxSearchGoodsVO = wxSearchGoodsService.searchGoods(wxSearchGoodsBO);

        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setErrmsg("成功");
        baseRespVo.setErrno(0);
        baseRespVo.setData(wxSearchGoodsVO);

        return baseRespVo;
    }
}
